package com.framework;

import java.nio.file.Files;
import java.nio.file.Path;

class FileProcessor {
    public static boolean saveFile(byte[] data, String path) {
        try {
            Files.write(Path.of(path), data);
            return true;
        } catch (Exception e) {
            return false;
        }
    }

    public static byte[] readFile(String path) {
        try {
            return Files.readAllBytes(Path.of(path));
        } catch (Exception e) {
            return new byte[0];
        }
    }
}